import axios from "@/api/config"

export async function getTemplatesList(data) { //获取试卷列表
    const url = `/paper/templates?page=${data.page}&limit=${data.limit}&section=${data.section}&type=${data.type}&name=${data.name}`;
    let res = await axios.get(url);
    return res.data;
}
export async function addTemplate(data) { //试卷新增
    const url = '/paper/template';
    const res = await axios.post(url,data);
    return res.data;
}
export async function updateTemplate(data) { //更新职工信息
    const url = '/paper/template';
    const res = await axios.put(url,data);
    return res.data;
}
export async function getTemplateDetail(data) { //更新职工信息
    const url = '/paper/template/'+data;
    const res = await axios.get(url);
    return res.data;
}
export async function deleTemplate(data) { //删除职工信息
    const url = '/paper/template/'+data;
    const res = await axios.delete(url);
    return res.data;
}

